﻿using IAD13.fromTDDtoBDD.Exceptions;
using Machine.Specifications;
using NUnit.Framework;

namespace IAD13.fromTDDtoBDD.MSpec.given_an_account.with_any_balance
{
    public class when_I_try_withdrawal_an_amount_greater_than_balance : with_any_balance
    {
        It should_throw_exception_withdrawal_greater_than_balance = () =>
            Assert.Catch<WithdrawalGreaterThanBalanceException>(() =>
                sut.Withdrawal(Amount.OfEuro(120)));

        It should_not_change_balance = () =>
            sut.Balance().ShouldEqual(Amount.OfEuro(10));
        
    }
}